﻿@model AchieveManageWeb.Models.MyTest.MVCPager
@{
    Layout = null;
}
@using Webdiyer.WebControls.Mvc;

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>MVCPager</title>
    <link href="~/Content/pagerstyles.css" rel="stylesheet" />
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div style="padding:15px;">
        <div style="float:left;">
            @using (Html.BeginForm("MVCPager", "MyTest", new RouteValueDictionary { { "id", "" } }, FormMethod.Get))
            {
                @Html.Label("关键字：")<input name="key" value="@Request.QueryString["key"]" /><input type="submit" value="查询" />
            }
        </div>

        @using (@Html.BeginForm("ImportStu", "MyTest", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            <div style="float:left;padding-left:30px;">
                <input name="file" type="file" id="file" />
            </div>
            <div style="float:left;padding:1px;">
                <input type="submit" name="Upload" value="上传" />&nbsp;&nbsp;&nbsp;<input type="button" name="Export" value="导出" onclick="location.href = '/MyTest/ExportStu'" /> @*<a href="javascript:;">@Html.ActionLink("导出Excel", "ExportStu")</a>*@
            </div>
        }
        <table class="table table-bordered table-striped">
            <tr>
                <th>编号</th>
                <th>标题</th>
                <th>内容</th>
            </tr>
            @foreach (var info in Model.Articles)
            {
                <tr>
                    <td>@Html.DisplayFor(model => info.ID)</td>
                    <td>@Html.DisplayFor(model => info.Title)</td>
                    <td>@Html.DisplayFor(model => info.Content)</td>
                </tr>
            }
        </table>

        <div class="text-center">
            <nav>
                @Html.Pager(Model.Articles, new PagerOptions
                {
                    PageIndexParameterName = "id",
                    NumericPagerItemCount = 5,
                    FirstPageText = "首页",
                    PrevPageText = "上一页",
                    NextPageText = "下一页",
                    LastPageText = "末页",
                    ContainerTagName = "ul",
                    CssClass = "pagination",
                    CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>",
                    DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>",
                    PagerItemTemplate = "<li>{0}</li>",
                    Id = "bootstrappager"
                })
            </nav>
        </div>
        @*
            <div class="text-center">
                <nav>
                    @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", ContainerTagName = "ul", CssClass = "pagination", CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>", DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>", PagerItemTemplate = "<li>{0}</li>", Id = "bootstrappager" })
                </nav>
            </div>
            <div class="row" style="height:80px">
                <div class="col-md-8">
                    @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", NumericPagerItemCount = 5, ContainerTagName = "ul", CssClass = "pagination", CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>", DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>", PagerItemTemplate = "<li>{0}</li>", Id = "bootstrappager2", PageIndexBoxId = "pageIndexBox", GoToButtonId = "goToBtn" })
                </div>
                <div class="col-md-4">
                    <div class="input-group" style="width:120px;margin:20px 0">
                        <select id="pageIndexBox" class="form-control input-sm"></select>
                        <span class="input-group-btn"><button class="btn btn-primary btn-sm" id="goToBtn">跳转</button></span>
                    </div>
                </div>
            </div>
            @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", CurrentPagerItemTemplate = "<span class=\"current\">{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "diggpager" })

            @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", CurrentPagerItemTemplate = "<span class=\"current\">{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "menepager" })

            @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", CurrentPagerItemTemplate = "<span class=\"current\">{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "flickrpager" })

            @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", CurrentPagerItemTemplate = "<span class=\"current\">{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "blackpager" })

            @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", CurrentPagerItemTemplate = "<span class=\"current\">{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "graypager" })

            @Html.Pager(Model.Articles, new PagerOptions { PageIndexParameterName = "id", CurrentPagerItemTemplate = "<span class=\"current\">{0}</span>", DisabledPagerItemTemplate = "<span class=\"disabled\">{0}</span>", Id = "badoopager" })*@


    </div>
</body>
</html>
